#include<stdio.h>

int main()
{
	int a[]={1,3,5,7,9,11,13,15};
	int b[]={2,4,6,8,11,15,17};
	int *pa=a;
	int *pb=b;
	int i,j;
	int len_a=sizeof(a)/sizeof(a[0]);
	int len_b=sizeof(b)/sizeof(b[0]);


	for(;pa<len_a + a-1 && pb<len_b+b-1;)
	{
		if(*pa>*pb)
		{
			pb++;
		}
		else if(*pb>*pa)
		{
			pa++;
		}
		if(*pa==*pb)
		{
			printf("The first element in both arrays is:%d\n",*pa);
			break;
		}
	}
	

	return 0;
}
